﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="order.aspx.cs" Inherits="backstage_order" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>编辑订单 </title>
    <link href="css/skin.css" rel="stylesheet" type="text/css" />
</head>

<script type="text/javascript" src="js/main.js"></script>

<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript">
    $(function () {
        $("#selectProvinces").change(function () {
            $("#spanCity").html(Web.Old_App_Code.Region_ajax.GetCityByParentId($("#selectProvinces").val()).value);
        });
        $("#txtDeliveryMoney").change(function () {
            $("#lblOrderTotal").html("￥" + (parseFloat($("#lblGoodsTotal").html().replace("￥", "").replace("元", "")) + parseFloat($("#txtDeliveryMoney").val())).toFixed(2) + "元");
        });
    });
</script>

<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">
        <tr>
            <td class="td_left_top">
                <img alt="" src="images/left-top-right.gif" /></td>
            <td class="td_middle_top">
                <div class="left_topbg">
                    <div class="titlebt">
                        编辑订单
                    </div>
                </div>
            </td>
            <td class="td_right_top">
                <img alt="" src="images/nav-right-bg.gif" /></td>
        </tr>
        <tr>
            <td class="td_left_middle">
            </td>
            <td class="td_middle_middle">
                <div class="maincontent">
                    <% Response.Write(PrintBind()); %>
                    <form id="form1" runat="server">
                        <table cellpadding="0" cellspacing="0" style="width: 100%">
                            <tr>
                                <td colspan="4">
                                    订单信息
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    订单编号：</td>
                                <td class="td_content1">
                                    <label id="lblOrderNo" runat="server">
                                    </label>
                                </td>
                                <td class="td_title1">
                                    下单时间：</td>
                                <td class="td_content1">
                                    <label id="lblCreateTime" runat="server">
                                    </label>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    商品总金额：</td>
                                <td class="td_content1">
                                    <label id="lblGoodsTotal" runat="server">
                                    </label>
                                </td>
                                <td class="td_title1">
                                    订单总金额：</td>
                                <td class="td_content1">
                                    <label id="lblOrderTotal" runat="server">
                                    </label>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    配送方式：</td>
                                <td class="td_content1">
                                    <select id="selectDeliveryWay" name="deliveryWay">
                                        <% Response.Write(DeliveryWayBind()); %>
                                    </select>
                                </td>
                                <td class="td_title1">
                                    支付方式：</td>
                                <td id="Td1" class="td_content1" runat="server">
                                    <select id="selectPayment" name="payment" runat="server">
                                        <option value="支付宝">支付宝</option>
                                        <option value="Paypal">Paypal</option>
                                        <option value="货到付款">货到付款</option>
                                        <option value="预存款">预存款</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    支付状态：</td>
                                <td class="td_content1">
                                    <select id="selectPayStatus" name="payStatus" runat="server">
                                        <option value="0" style="background-color: Red;">未支付</option>
                                        <option value="1" style="background-color: Green;">已支付</option>
                                    </select>
                                </td>
                                <td class="td_title1">
                                    配送状态：</td>
                                <td class="td_content1">
                                    <select id="selectDeliveryStatus" name="deliveryStatus" runat="server">
                                        <option value="0" style="background-color: Red;">未发货</option>
                                        <option value="1" style="background-color: Yellow;">已发货</option>
                                        <option value="2" style="background-color: Green;">已收货</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    配送费用：</td>
                                <td class="td_content1">
                                    <input id="txtDeliveryMoney" name="deliveryMoney" type="text" runat="server" style="ime-mode: disabled;"
                                        onpropertychange="if(isNaN(value)) value=value.substring(0,value.length-1);"
                                        maxlength="10" size="14" />
                                </td>
                                <td class="td_title1">
                                    订单状态：</td>
                                <td class="td_content1">
                                    <select id="selectOrderStatus" name="orderStatus" runat="server">
                                        <option value="0" style="background-color: Red;">未确认</option>
                                        <option value="1" style="background-color: Green;">已确认</option>
                                        <option value="2" style="background-color: Yellow;">已取消</option>
                                        <option value="3" style="background-color: Blue;">无效</option>
                                        <option value="4" style="background-color: Gray;">退货</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    赠送积分：</td>
                                <td class="td_content1" colspan="3">
                                    <input id="txtPresentedIntegra" type="text" runat="server" onpaste="return false"
                                        onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" />
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    订单附言：</td>
                                <td class="td_content1">
                                    <span id="spanPostscript" runat="server"></span>
                                </td>
                                <td class="td_title1">
                                    订单备注：</td>
                                <td class="td_content1">
                                    <span id="spOrderRemark" runat="server"></span>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    收货信息
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    收货人姓名：</td>
                                <td class="td_content1">
                                    <input id="txtConsignee" name="consignee" type="text" runat="server" />
                                </td>
                                <td class="td_title1">
                                    收货地区：</td>
                                <td class="td_content1">
                                    <%Response.Write(ProvincesBind()); %>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    收货地址：</td>
                                <td class="td_content1">
                                    <input id="txtAddress" name="address" type="text" runat="server" />
                                </td>
                                <td class="td_title1">
                                    邮政编码：</td>
                                <td class="td_content1">
                                    <input id="txtZipCode" name="zipCode" type="text" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title1">
                                    联系电话：</td>
                                <td class="td_content1">
                                    <input id="txtTelephone" name="telephone" type="text" runat="server" />
                                </td>
                                <td class="td_title1">
                                    手机号码：</td>
                                <td class="td_content1">
                                    <input id="txtMobile" name="mobile" type="text" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    商品信息
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    <table border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                商品货号</td>
                                            <td>
                                                商品名称</td>
                                            <td>
                                                价格</td>
                                            <td>
                                                购买数量</td>
                                            <td>
                                                删除</td>
                                        </tr>
                                        <asp:Repeater ID="rptOrderGoodsEntitys" runat="server" OnItemCommand="rptOrderGoodsEntitys_ItemCommand">
                                            <ItemTemplate>
                                                <tr>
                                                    <td>
                                                        <a href="/goods.html?id=<%# Eval("gId") %>" target="_blank">
                                                            <%# Eval("goodsArtNo") %>
                                                        </a>
                                                    </td>
                                                    <td>
                                                        <a href="/goods.html?id=<%# Eval("gId") %>" target="_blank">
                                                            <%# Eval("goodsName") %>
                                                        </a>
                                                        <%# GetGoodsEntitysSpecifications(Eval("goodsEntitys"))%>
                                                    </td>
                                                    <td>
                                                        <%# Eval("price") %>
                                                    </td>
                                                    <td>
                                                        <%# Eval("amount") %>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID='lbtDelete' runat="server" CommandArgument='<%# Eval("id") %>'
                                                            CommandName="del" OnClientClick="return confirm('确定要删除吗？');" ToolTip="删除"><img src="images/del.gif" alt="删除" />删除</asp:LinkButton></td>
                                                </tr>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    <asp:Button ID="btnSubmit1" runat="server" Text="确  定" CssClass="formButton" OnClick="btnSubmit_Click"
                                        OnClientClick="return checkOrderForm();" />&nbsp;&nbsp;&nbsp;&nbsp;
                                    <input id="btnBack" type="button" class="formButton" value=" 返  回 " onclick="location.href='order_list.aspx';" /></td>
                            </tr>
                        </table>
                    </form>
                </div>
            </td>
            <td class="td_right_middle">
            </td>
        </tr>
        <tr>
            <td class="td_left_bottom">
                <img alt="" src="images/buttom_left2.gif" />
            </td>
            <td class="td_middle_bottom">
                <img alt="" src="images/buttom_bgs.gif" />
            </td>
            <td class="td_right_bottom">
                <img alt="" src="images/buttom_right2.gif" />
            </td>
        </tr>
    </table>
</body>
</html>
